package redteam.grabthegreen;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Paint.Style;

import com.google.android.maps.Overlay;
import com.google.android.maps.Point;

public class MapField extends Overlay {
    Paint paint1;
    Point point1;
    Point point2;

    public MapField(Point p1, Point p2) {
        point1 = p1;
        point2 = p2;
        paint1 = new Paint();
        paint1.setStyle(Style.FILL);
        paint1.setARGB(50,0,255,0);
    }

    public void draw(Canvas canvas, PixelCalculator pixelCalculator, boolean b) {
        super.draw(canvas, pixelCalculator, b);
        //int[] screenCoords = new int[2];
        //pixelCalculator.getPointXY(point, screenCoords);
        canvas.drawRect(point1.getLatitudeE6(), point1.getLongitudeE6(), point2.getLatitudeE6(), point2.getLongitudeE6(), paint1);
        //canvas.drawText(Integer.toString(screenCoords[0]) + Integer.toString(screenCoords[1]), screenCoords[0], screenCoords[1], paint1);
    }
}
